import axios from '@/utils/request'

export function getUserChannel () {
  return axios({
    method: 'get',
    url: '/v1_0/user/channels'
  })
}

export function getAllChannel () {
  return axios({
    method: 'get',
    url: '/v1_0/channels'
  })
}

export function addChannel (channels) {
  return axios({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: {
      channels
    }
  })
}

export function delChannel (id) {
  return axios({
    method: 'DELETE',
    url: `/v1_0/user/channels/${id}`
  })
}
